home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 15
/
Aminet 15 - Nov 1996.iso
/
Aminet
/
comm
/
www
/
AWebSave.lha
/
AWebSave
next >
Wrap
Text File
|
1996-09-20
|
3KB
|
182 lines
;
; AWebSave - Script to save anything viewed/played within AWeb.
;
; Based on MosaicSave - written by Stuart Toll.
;
; Version 1.0 - Lovingly put together by Rob Hockley.
;
; $VER:AWebSend 2.0 [20-Sep-96]
;
; / __ __ __ / __ ___ /
; / (_ (_ (_ / /_/ /) / / _ / /
;(__/ (__ / / (__/ / / / (/ /__/ (_ /
;_______________________________________________________________
;Email: jeff.jangli@tip.nl | WWW: www.tip.nl/users/jeff.jangli
;
; BEGIN of Localization
; "Please select action for this file"
SETENV Init0AWS "Wat wilt u met dit bestand doen?"
; "Use external program"
SETENV Init1AWS "Extern programma gebruiken"
; "Save"
SETENV Init2AWS "Bewaar"
; "Abort"
SETENV Init3AWS "Annuleer"
; "Would you like to save this file?"
SETENV SaveAWS "Wilt u dit bestand bewaren?"
; "Yes", "No", "OK"
SETENV YesAWS "Ja"
SETENV NoAWS "Nee"
SETENV OkAWS "OK"
; "Save as..."
SETENV SaveAsAWS "Opslaan als..."
; "ERROR: Change filename for saving!"
; "ERROR: File is not present in cache."
SETENV ErrSave1AWS "FOUT: Wijzig de bestandsnaam!"
SETENV ErrSave2AWS "FOUT: Bestand staat niet meer in de cache."
; END of Localization
; String for window title, THIS one only to be updated by the programmer
SETENV AWebTool "AWebSave 2.0"
.BRA {
.KET }
.KEY AWebFile,ScreenName,Viewer,DownloadDir
RequestChoice >ENV:InitAWS TITLE="$AWebTool" BODY="$Init0AWS" GADGETS="$Init1AWS""$Init2AWS""$Init3AWS" PUBSCREEN={ScreenName}
IF $InitAWS EQ 0
SKIP ExitProg
ENDIF
IF $InitAWS EQ 2
SETENV AnswerAWS 1
SKIP SaveFile
ENDIF
IF $InitAWS EQ 1
; Show/Play file
; Find out the pubscreen parameter for your viewer.
; For MultiView you would enter: PUBSCREEN {ScreenName}
{Viewer} PUBSCREEN={ScreenName} {AWebFile}
; Still give user a change to save the file
RequestChoice >ENV:AnswerAWS TITLE="$AWebTool" BODY="$SaveAWS" GADGETS="$YesAWS""$NoAWS" PUBSCREEN={ScreenName}
IF $AnswerAWS EQ 1
SKIP SaveFile
ENDIF
ENDIF
; Save file on user demand
LAB SaveFile
IF $AnswerAWS EQ 1
IF EXISTS {AWebFile} THEN
; Get the drawer and/or filename
RequestFile PUBSCREEN={ScreenName} TITLE="$SaveAsAWS" DRAWER={DownloadDir} FILE={AWebFile} SAVEMODE >ENV:SaveNameAWS
; Got all the info we need, proceed when users confirms
IF NOT WARN
; File from AWeb is a cache file, make sure user changed filename
IF $SaveNameAWS EQ {AWebFile}
Requestchoice TITLE="$AWebTool" BODY="$ErrSave1AWS" GADGETS="$OkAWS" >NIL:
SKIP ExitProg
ENDIF
COPY {AWebFile} TO $SaveNameAWS
ENDIF
SKIP ExitProg
ENDIF
; File is no longer present in AWeb's cache...
Requestchoice TITLE="$AWebTool" BODY="$ErrSave2AWS" GADGETS="$OkAWS" >NIL:
ENDIF
; Clean-up and exit
LAB ExitProg
UNSETENV InitAWS
UNSETENV Init0AWS
UNSETENV Init1AWS
UNSETENV Init2AWS
UNSETENV Init3AWS
UNSETENV SaveAWS
UNSETENV YesAWS
UNSETENV NoAWS
UNSETENV OkAWS
UNSETENV SaveAsAWS
UNSETENV ErrSave1AWS
UNSETENV ErrSave2AWS
UNSETENV AWebTool
UNSETENV AnswerAWS
UNSETENV SaveNameAWS